﻿using System;
using System.Collections.Generic;
using System.Xml;
using System.Xml.Serialization;
using System.Drawing;
using rlTodayMakeSkin.Project.Attributes;

namespace rlTodayMakeSkin.Project.XmlElement
{
    /// <summary>
    /// class that represents a AnalogClock element in the skin.xml file
    /// </summary>
    public class rlAnalogClock : rlTodayXmlElement
    {
        private string clockface="";

        public rlAnalogClock(XmlAttributeCollection attr, rlTodayProject prj)
            : base(attr, prj)
        {
            
            if (listaAtt["clockface"] != null) clockface = listaAtt["clockface"].Value;
            if (clockface == "") clockface = "AnalogClockBig.png";
            strNome = "AnalogClock";
        }

        public rlAnalogClock(rlTodayProject p)
            : base(p)
        {
            clockface = "AnalogClockBig.png";
            strNome = "AnalogClock";
        }

        public rlAnalogClock() { }

        /// <summary>
        /// Gets, sets the clockface attribute for this clock (name of the mask image file for the clock)
        /// </summary>
        [PropertyDescription("Gets, sets the clockface attribute for this clock (name of the mask image file for the clock)", PropertyTypes.FILE_IMAGE)]
        [XmlAttribute("clockface")]
        public string Clockface
        {
            get { return clockface; }
            set { clockface = value; myProject.IsModified = true; }
        }

        public override void DrawElement(Graphics g)
        {
            DrawImage(g,clockface);
        }

        /**************************
         PRIVATE MEMBERS
         *************************/



    }
}
